import request from '@/api/request'

export function loginByUsername(username, password) {

    let data = new FormData()
    data.append('account', username)
    data.append('password', password)
    return request({
        url: '/login/logit',
        method: 'POST',
        data
    })
}

export function logout(token) {
    return request({
        url: '/login/logItOut',
        method: 'POST'
    })
}

export function getUserInfo(token) {
    return request({
        url: '/login/getuserinfo',
        method: 'POST'
    })
}